//
//  JourneyTopCell.m
//  QYer
//
//  Created by lanou on 16/8/11.
//  Copyright © 2016年 CaiZhuYu. All rights reserved.
//

#import "JourneyTopCell.h"

@implementation JourneyTopCell

- (void)setContentWithModel:(JourneyTopModel *)model {
    self.columnLabel.text = model.column;
    self.titleLabel.text = model.title;
    self.subjectLabel.text = model.subject;
    //http://pic.qyer.com/public/2016/08/11/57abd3a2ef199.jpg?imageView2/1/w/800/h/450/format/webp/710x360
    //http://pic.qyer.com/public/2016/08/10/57aad21a0e9bf.jpeg?imageView2/1/w/800/h/450/format/webp/710x360
    NSArray *array = [model.cover componentsSeparatedByString:@"?image"];
    NSString *picStr = array[0];
    [self.picView sd_setImageWithURL:[NSURL URLWithString:picStr] placeholderImage:[UIImage imageNamed:@"占位图"]];
}

/*
 //价格:<em>4999</em>元起
 //self.priceLabel.text = model.price;
 NSString *string = @"(>)(\\w+)(<)";
 NSRange range = [model.price rangeOfString:string options:NSRegularExpressionSearch];
 if (range.location != NSNotFound) {
 NSString *priceNumber = [model.price substringWithRange:NSMakeRange(range.location+1, range.length-2)];
 self.priceLabel.text = [NSString stringWithFormat:@"%@元起", priceNumber];
 }
*/

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
